{% extends 'blog/base.html' %}

{% block section %}
<div class="box">
    <h1 class="is-size-5 has-text-weight-bold">
        <a> {{ post.title }}</a>
    </h1>
    <div class=" is-size-7 has-text-grey-light pt-1 pb-1">
        <span class="mr-3">作者：{{ post.owner }}</span> <span>发布日期：{{ post.add_date }}</span> <span>浏览量：{{ post.pv }}</span>
    </div>
    <div class="content">
        {{ post.content|safe }}
    </div>
</div>

<div class="box">
    <div class="level">
        <div class="level-left">
            
            {% if prev_post %}
            <span>上一篇：</span><a href="{% url 'blog:post_detail' prev_post.id %}" class="level-item">{{ prev_post.title }}</a>
            {% else %}
            <span class=" has-text-danger-dark is-size-7">无上一篇</span>
            {% endif %}
        </div>
        <div class="level-right">
            {% if next_post %}
            <span>下一篇：</span><a href="{% url 'blog:post_detail' next_post.id %}" class="level-item">{{ next_post.title }}</a>
            {% else %}
            <span class=" has-text-danger-dark is-size-7">已经是最后一篇</span>
            {% endif %}
        </div>
    </div>
</div>

{% endblock %}